<extend name="Public/base"/>
<block name="body">
  <div class="fixed-bar" id="AuthRule_Bar">
    <div class="item-title">
      <h3>菜单</h3>
      <ul class="tab-base">
        <if condition="Is_Auth('Admin/AuthRule/index')">
          <li><a href="{:U('Admin/AuthRule/index')}"><span>列表</span></a></li>
        </if>
        <li><a class="current"href="{:U('Admin/AuthRule/add')}"><span>新增</span></a></li>
      </ul>
    </div>
  </div>
  <form id="AuthRule_Form" method="post">
    <table class="table tb-type2 nobdb">
      <tbody>
        <tr>
          <td colspan="2" class="required"><label for="for_name">上级菜单:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="pid" class="easyui-combotree" style="height:30px;" data-options="value:'{:I('get.pid',0)}',url:'{:U('Admin/Function/get_auth_rule')}&pid=-1&r_type=json',multiple:false,required:false,editable:false">
            </select></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">标题:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input name="title" type="text" class="easyui-textbox" style="height:30px;" value="" data-options="required:false"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">节点:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input name="name" type="text" class="easyui-textbox" style="height:30px;" value="" data-options="required:false"></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_icon">图标:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="icon" id="for_icon" class="easyui-combobox" style="height:30px;" data-options="value:'',url:'{:U("Admin/Function/get_icon")}&r_type=json',valueField:'id',textField:'text',multiple:false,required:false,editable:false,    
        formatter: function(row){
            var opts = $(this).combobox('options');
            return '<i class=\'iconfont '+row[opts.textField]+'\'></i> '+row[opts.textField];
            }">
            </select></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">菜单类型:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="type" class="easyui-combobox" style="height:30px;" data-options="value:'1',multiple:false,required:false,editable:false">
              <option value="1" >节点</option>
              <option value="2" >菜单</option>
              <option value="3" >外链</option>
            </select></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">隐藏:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="hide" class="easyui-combobox" style="height:30px;" data-options="value:'0',multiple:false,required:false,editable:false">
              <option value="0" >否</option>
              <option value="1" >是</option>
            </select></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">状态:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select name="status" class="easyui-combobox" style="height:30px;" data-options="value:'1',multiple:false,required:false,editable:false">
              <option value="0" >禁用</option>
              <option value="1" >启用</option>
            </select></td>
          <td class="vatop tips"></td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">排序:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input name="sort" value="0" type="text" class="easyui-numberbox" style="height:30px;" data-options="precision:'0',decimalSeparator:'.',groupSeparator:',',required:false"></td>
          <td class="vatop tips">同级菜单有效</td>
        </tr>
        <tr>
          <td colspan="2" class="required"><label for="for_name">附加规则:</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input name="condition" value="" type="text" class="easyui-textbox" data-options="required:false,multiline:true" style="width:300px; height:80px;"></td>
          <td class="vatop tips"></td>
        </tr>
      </tbody>
      <tfoot>
        <tr class="tfoot">
          <td colspan="2"><a class="easyui-linkbutton" href="JavaScript:void(0);" onclick="$('#AuthRule_Form').submit();" data-options="iconCls:'iconfont icon-edit'"><span style="font-size: 14px; font-weight: 600;">提交</span></a></td>
        </tr>
      </tfoot>
    </table>
  </form>
</block>